package com.yituo.mjworld.mvc.entity.web;

import com.yituo.mjworld.core.web.core.BaseForm;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "web_return_request", schema = "web_mojianworld_server", catalog = "")
public class WebReturnRequest extends BaseForm {
  private Integer id;
  private String orderId;
  private Date createDate;
  private Date processDate;
  private Integer processStatus;
  private String userNote;
  private String adminNote;

  @Id
  @Column(name = "id", nullable = true)
  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  @Basic
  @Column(name = "orderId", nullable = true, length = 50)
  public String getOrderId() {
    return orderId;
  }

  public void setOrderId(String orderId) {
    this.orderId = orderId;
  }

  @Basic
  @Column(name = "createDate", nullable = true)
  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  @Basic
  @Column(name = "processDate", nullable = true)
  public Date getProcessDate() {
    return processDate;
  }

  public void setProcessDate(Date processDate) {
    this.processDate = processDate;
  }

  @Basic
  @Column(name = "processStatus", nullable = true)
  public Integer getProcessStatus() {
    return processStatus;
  }

  public void setProcessStatus(Integer processStatus) {
    this.processStatus = processStatus;
  }

  @Basic
  @Column(name = "userNote", nullable = true, length = 50)
  public String getUserNote() {
    return userNote;
  }

  public void setUserNote(String userNote) {
    this.userNote = userNote;
  }

  @Basic
  @Column(name = "adminNote", nullable = true, length = 50)
  public String getAdminNote() {
    return adminNote;
  }

  public void setAdminNote(String adminNote) {
    this.adminNote = adminNote;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    WebReturnRequest that = (WebReturnRequest) o;

    if (id != null ? !id.equals(that.id) : that.id != null) {
      return false;
    }
    if (orderId != null ? !orderId.equals(that.orderId) : that.orderId != null) {
      return false;
    }
    if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) {
      return false;
    }
    if (processDate != null ? !processDate.equals(that.processDate) : that.processDate != null) {
      return false;
    }
    if (processStatus != null ? !processStatus.equals(that.processStatus) : that.processStatus != null) {
      return false;
    }
    if (userNote != null ? !userNote.equals(that.userNote) : that.userNote != null) {
      return false;
    }
    if (adminNote != null ? !adminNote.equals(that.adminNote) : that.adminNote != null) {
      return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int result = id != null ? id.hashCode() : 0;
    result = 31 * result + (orderId != null ? orderId.hashCode() : 0);
    result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
    result = 31 * result + (processDate != null ? processDate.hashCode() : 0);
    result = 31 * result + (processStatus != null ? processStatus.hashCode() : 0);
    result = 31 * result + (userNote != null ? userNote.hashCode() : 0);
    result = 31 * result + (adminNote != null ? adminNote.hashCode() : 0);
    return result;
  }

  @Override
  public boolean validate() {
    return defaultValidate();
  }
}
